var id = 1;
$.extend({
    vote:{
        addOption:function(u,nimg){
            id++;
            var url = u+'&id='+id;
            var str = '<li><label>标题</label><input class="text-input larger-input" type="text" name="voteName[]" />'+
            '<img id="vlitS'+id+'" class="coverImg" style="margin-top:5px; margin-bottom: 5px;" src="'+nimg+'" />'+
            '<input type="hidden" name="voteid[]" value="0" /><input type="hidden" name="voteLitpic[]" id="vlit'+id+'" />'+
            '<iframe border="no" width="100%" height="60px" src="'+url+'" ></iframe><br /><a href="javascript:void(0);" onclick="$.vote.deleteDom(this.parentNode);">删除</a></li>';
            $('#voteBox').append(str);    
    },
        deleteDom:function(dom){
            $(dom).remove();
        }
    }
});